import request from '@/utils/request'

// 查询卷库列表
export function listLibrary(query) {
  return request({
    url: '/paper/library/list',
    method: 'get',
    params: query
  })
}

// 查询卷库详细
export function getLibrary(id) {
  return request({
    url: '/paper/library/' + id,
    method: 'get'
  })
}

// 新增卷库
export function addLibrary(data) {
  return request({
    url: '/paper/library',
    method: 'post',
    data: data
  })
}

// 修改卷库
export function updateLibrary(data) {
  return request({
    url: '/paper/library/update',
    method: 'post',
    data: data
  })
}

// 删除卷库
export function delLibrary(id) {
  return request({
    url: '/paper/library/delete/' + id,
    method: 'post'
  })
}

// 导出卷库
export function exportLibrary(query) {
  return request({
    url: '/paper/library/export',
    method: 'get',
    params: query
  })
}

// 课程开课单位树 数据
export function getQueryCourseTree() {
  return request({
    url: '/org/course/queryCourseTree',
    method: 'get',
  })
}
